package com.cskaoyan.controller.wx;

import com.cskaoyan.service.wx.WxFootprintSerivice;
import com.cskaoyan.vo.BaseRespVo;
import com.cskaoyan.vo.wx.WxFootprintListVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author: feisl
 * @Date: 2021/5/13 16:29
 */
@RestController
@RequestMapping("wx/footprint")
public class WxFootprintController {
    @Autowired
    WxFootprintSerivice wxFootprintSerivice;
    @RequestMapping("list")
    public BaseRespVo list(Integer page,Integer size){

        WxFootprintListVo wxFootprintListVo = wxFootprintSerivice.list(page,size);

        return BaseRespVo.ok(wxFootprintListVo);
    }

    @RequestMapping("delete")
    public BaseRespVo delete(@RequestBody Map map){

        Integer id = (Integer) map.get("id");

        wxFootprintSerivice.delete(id);

        return BaseRespVo.ok();
    }
}
